import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { AppCommonModule } from '@app/shared/common/app-common.module';
import { UtilsModule } from '@shared/utils/utils.module';
import { NgxChartsModule } from '@swimlane/ngx-charts';
import { CountoModule } from 'angular2-counto';
import { TextMaskModule } from 'angular2-text-mask';
import { AddMemberModalComponent } from 'app/admin/organization-units/add-member-modal.component';
import { AddRoleModalComponent } from 'app/admin/organization-units/add-role-modal.component';
import { NgxBootstrapDatePickerConfigService } from 'assets/ngx-bootstrap/ngx-bootstrap-datepicker-config.service';
import { FileUploadModule } from 'ng2-file-upload';
import { BsDropdownModule, ModalModule, PopoverModule, TabsModule, TooltipModule } from 'ngx-bootstrap';
import { BsDatepickerConfig, BsDatepickerModule, BsDaterangepickerConfig, BsLocaleService } from 'ngx-bootstrap/datepicker';
import { ImageCropperModule } from 'ngx-image-cropper';
import { TreeDragDropService } from 'primeng/api';
import { ContextMenuModule } from 'primeng/contextmenu';
import { DragDropModule } from 'primeng/dragdrop';
import { AutoCompleteModule, EditorModule, TabViewModule, FileUploadModule as PrimeNgFileUploadModule, InputMaskModule, PaginatorModule, CardModule } from 'primeng/primeng';
import { TableModule } from 'primeng/table';
import { TreeModule } from 'primeng/tree';
import { AdminRoutingModule } from './admin-routing.module';
import { AuditLogDetailModalComponent } from './audit-logs/audit-log-detail-modal.component';
import { AuditLogsComponent } from './audit-logs/audit-logs.component';
import { BopComponent } from './bop/bop.component';
import { CreateOrEditBopModalComponent } from './bop/create-or-edit-bop-modal.component';
import { CreateOrEditBopTaskModalComponent } from './bop/create-or-edit-boptask-modal.component';
import { CreateOrEditBopTreeModalComponent } from './bop/create-or-edit-boptree-modal.component';
import { CreateOrEditDrawModalComponent } from './bop/create-or-edit-draw-modal.component';
import { HostDashboardComponent } from './dashboard/host-dashboard.component';
import { DemoUiComponentsComponent } from './demo-ui-components/demo-ui-components.component';
import { DemoUiDateTimeComponent } from './demo-ui-components/demo-ui-date-time.component';
import { DemoUiEditorComponent } from './demo-ui-components/demo-ui-editor.component';
import { DemoUiFileUploadComponent } from './demo-ui-components/demo-ui-file-upload.component';
import { DemoUiInputMaskComponent } from './demo-ui-components/demo-ui-input-mask.component';
import { DemoUiSelectionComponent } from './demo-ui-components/demo-ui-selection.component';
import { CreateEditionModalComponent } from './editions/create-edition-modal.component';
import { EditEditionModalComponent } from './editions/edit-edition-modal.component';
import { EditionsComponent } from './editions/editions.component';
import { MoveTenantsToAnotherEditionModalComponent } from './editions/move-tenants-to-another-edition-modal.component';
import { InstallComponent } from './install/install.component';
import { CreateOrEditLanguageModalComponent } from './languages/create-or-edit-language-modal.component';
import { EditTextModalComponent } from './languages/edit-text-modal.component';
import { LanguageTextsComponent } from './languages/language-texts.component';
import { LanguagesComponent } from './languages/languages.component';
import { MaintenanceComponent } from './maintenance/maintenance.component';
import { CreateOrEditUnitModalComponent } from './organization-units/create-or-edit-unit-modal.component';
import { OrganizationTreeComponent } from './organization-units/organization-tree.component';
import { OrganizationUnitMembersComponent } from './organization-units/organization-unit-members.component';
import { OrganizationUnitRolesComponent } from './organization-units/organization-unit-roles.component';
import { OrganizationUnitsComponent } from './organization-units/organization-units.component';
import { CreateOrEditRoleModalComponent } from './roles/create-or-edit-role-modal.component';
import { RolesComponent } from './roles/roles.component';
import { HostSettingsComponent } from './settings/host-settings.component';
import { TenantSettingsComponent } from './settings/tenant-settings.component';
import { EditionComboComponent } from './shared/edition-combo.component';
import { FeatureTreeComponent } from './shared/feature-tree.component';
import { OrganizationUnitsTreeComponent } from './shared/organization-unit-tree.component';
import { PermissionComboComponent } from './shared/permission-combo.component';
import { PermissionTreeComponent } from './shared/permission-tree.component';
import { RoleComboComponent } from './shared/role-combo.component';
import { InvoiceComponent } from './subscription-management/invoice/invoice.component';
import { SubscriptionManagementComponent } from './subscription-management/subscription-management.component';
import { CreateTenantModalComponent } from './tenants/create-tenant-modal.component';
import { EditTenantModalComponent } from './tenants/edit-tenant-modal.component';
import { TenantFeaturesModalComponent } from './tenants/tenant-features-modal.component';
import { TenantsComponent } from './tenants/tenants.component';
import { DefaultThemeUiSettingsComponent } from './ui-customization/default-theme-ui-settings.component';
import { Theme10ThemeUiSettingsComponent } from './ui-customization/theme10-theme-ui-settings.component';
import { Theme11ThemeUiSettingsComponent } from './ui-customization/theme11-theme-ui-settings.component';
import { Theme12ThemeUiSettingsComponent } from './ui-customization/theme12-theme-ui-settings.component';
import { Theme2ThemeUiSettingsComponent } from './ui-customization/theme2-theme-ui-settings.component';
import { Theme3ThemeUiSettingsComponent } from './ui-customization/theme3-theme-ui-settings.component';
import { Theme4ThemeUiSettingsComponent } from './ui-customization/theme4-theme-ui-settings.component';
import { Theme5ThemeUiSettingsComponent } from './ui-customization/theme5-theme-ui-settings.component';
import { Theme6ThemeUiSettingsComponent } from './ui-customization/theme6-theme-ui-settings.component';
import { Theme7ThemeUiSettingsComponent } from './ui-customization/theme7-theme-ui-settings.component';
import { Theme8ThemeUiSettingsComponent } from './ui-customization/theme8-theme-ui-settings.component';
import { Theme9ThemeUiSettingsComponent } from './ui-customization/theme9-theme-ui-settings.component';
import { UiCustomizationComponent } from './ui-customization/ui-customization.component';
import { CreateOrEditUserModalComponent } from './users/create-or-edit-user-modal.component';
import { EditUserPermissionsModalComponent } from './users/edit-user-permissions-modal.component';
import { ImpersonationService } from './users/impersonation.service';
import { UsersComponent } from './users/users.component';
import { DataExportComponent } from './bop/data-export/data-export.component';
import { ShowResumeComponent } from './bop/show-resume/show-resume.component';
import { FileManageComponent } from './file-manage/file-manage.component';
import { InputSwitchModule } from 'primeng/inputswitch';
import { SearchComponent } from './file-manage/search/search.component';
import { FileManageDetailComponent } from './file-manage/file-manage-detail/file-manage-detail.component';
import { LightboxModule } from 'primeng/lightbox';
import { SidebarModule } from 'primeng/sidebar';
import { DriverComponent } from './driver/driver.component';
import { ChartModule } from 'primeng/chart';
import { ImportBopComponent } from './bop/import-bop/import-bop.component';
import { ProcedureChangeComponent } from './change-management/procedure-change/procedure-change.component';
import { BomChangeComponent } from './change-management/bom-change/bom-change.component';
import { AddOrEdditComponent } from './change-management/procedure-change/add-or-eddit/add-or-eddit.component';
import { InputTextareaModule } from 'primeng/inputtextarea';
import { MaintainComponent } from './change-management/procedure-change/maintain/maintain.component';
import { BomShowResumeComponent } from './change-management/bom-change/bom-show-resume/bom-show-resume.component';
import { BomAddOrEditComponent } from './change-management/bom-change/bom-add-or-edit/bom-add-or-edit.component';
import { ListboxModule } from 'primeng/listbox';
import { MultiSelectModule } from 'primeng/multiselect';
import { DialogModule } from 'primeng/dialog';
import { BomMaintainComponent } from './change-management/bom-change/bom-add-or-edit/bom-maintain/bom-maintain.component';
import { TreeTableModule } from 'primeng/treetable';
import { ToggleButtonModule } from 'primeng/togglebutton';
import { BomApprovalComponent } from './change-management/bom-change/bom-approval/bom-approval.component';
import { TriStateCheckboxModule } from 'primeng/tristatecheckbox';
import { MaterialSonComponent } from './change-management/bom-change/bom-add-or-edit/material-son/material-son.component';
import { MountDetailsComponent } from './change-management/procedure-change/mount-details/mount-details.component';
import { PersonManagementComponent } from './production-management/time-management/person-management/person-management.component';
import { TeamManagementComponent } from './production-management/time-management/team-management/team-management.component';
import { WorkReporComponent } from './production-management/work-repor-management/work-repor/work-repor.component';
import { WorkReporRecordComponent } from './production-management/work-repor-management/work-repor-record/work-repor-record.component';

import { SpinnerModule } from 'primeng/spinner';
import { SliderModule } from 'primeng/slider';
import { CalendarModule } from 'primeng/calendar';
import { SelectButtonModule } from 'primeng/selectbutton';
import { CheckboxModule } from 'primeng/checkbox';
import { PrrcedureShowResumeComponent } from './change-management/procedure-change/prrcedure-show-resume/prrcedure-show-resume.component';
import { ProdureApprovalComponent } from './change-management/procedure-change/produre-approval/produre-approval.component';
import { WatchMaintainComponent } from './change-management/procedure-change/watch-maintain/watch-maintain.component';
import { BopExportComponent } from './bop/bop-export/bop-export.component';
import { TskExportComponent } from './bop/tsk-export/tsk-export.component';
import { ChooseBomComponent } from './change-management/procedure-change/choose-bom/choose-bom.component';
@NgModule({
    imports: [
        TriStateCheckboxModule,
        ToggleButtonModule,
        TreeTableModule,
        DialogModule,
        MultiSelectModule,
        ListboxModule,
        InputTextareaModule,
        ChartModule,
        SidebarModule,
        FormsModule,
        ReactiveFormsModule,
        LightboxModule,
        CommonModule,
        FileUploadModule,
        ModalModule.forRoot(),
        TabsModule.forRoot(),
        TooltipModule.forRoot(),
        PopoverModule.forRoot(),
        BsDropdownModule.forRoot(),
        BsDatepickerModule.forRoot(),
        AdminRoutingModule,
        UtilsModule,
        AppCommonModule,
        TableModule,
        TreeModule,
        DragDropModule,
        ContextMenuModule,
        PaginatorModule,
        PrimeNgFileUploadModule,
        AutoCompleteModule,
        EditorModule,
        InputMaskModule,
        NgxChartsModule,
        CountoModule,
        TextMaskModule,
        ImageCropperModule,
        TabViewModule,
        CardModule,
        InputSwitchModule,
        SpinnerModule,
        SliderModule,
        CalendarModule,
        SelectButtonModule,
        CheckboxModule

    ],
    declarations: [
        UsersComponent,
        PermissionComboComponent,
        RoleComboComponent,
        CreateOrEditUserModalComponent,
        EditUserPermissionsModalComponent,
        PermissionTreeComponent,
        FeatureTreeComponent,
        OrganizationUnitsTreeComponent,
        RolesComponent,
        CreateOrEditRoleModalComponent,
        AuditLogsComponent,
        AuditLogDetailModalComponent,
        HostSettingsComponent,
        InstallComponent,
        MaintenanceComponent,
        EditionsComponent,
        CreateEditionModalComponent,
        EditEditionModalComponent,
        MoveTenantsToAnotherEditionModalComponent,
        LanguagesComponent,
        LanguageTextsComponent,
        CreateOrEditLanguageModalComponent,
        TenantsComponent,
        CreateTenantModalComponent,
        EditTenantModalComponent,
        TenantFeaturesModalComponent,
        CreateOrEditLanguageModalComponent,
        EditTextModalComponent,
        OrganizationUnitsComponent,
        OrganizationTreeComponent,
        OrganizationUnitMembersComponent,
        OrganizationUnitRolesComponent,
        CreateOrEditUnitModalComponent,
        TenantSettingsComponent,
        HostDashboardComponent,
        EditionComboComponent,
        InvoiceComponent,
        SubscriptionManagementComponent,
        AddMemberModalComponent,
        AddRoleModalComponent,
        DemoUiComponentsComponent,
        DemoUiDateTimeComponent,
        DemoUiSelectionComponent,
        DemoUiFileUploadComponent,
        DemoUiInputMaskComponent,
        DemoUiEditorComponent,
        UiCustomizationComponent,
        DefaultThemeUiSettingsComponent,
        Theme2ThemeUiSettingsComponent,
        Theme3ThemeUiSettingsComponent,
        Theme4ThemeUiSettingsComponent,
        Theme5ThemeUiSettingsComponent,
        Theme6ThemeUiSettingsComponent,
        Theme7ThemeUiSettingsComponent,
        Theme8ThemeUiSettingsComponent,
        Theme9ThemeUiSettingsComponent,
        Theme10ThemeUiSettingsComponent,
        Theme12ThemeUiSettingsComponent,
        Theme11ThemeUiSettingsComponent,
        BopComponent,//bop主页面
        CreateOrEditBopTaskModalComponent,//bop新增任务组件
        CreateOrEditBopModalComponent,//bop新增组件
        CreateOrEditBopTreeModalComponent,//bop树结构新增
        CreateOrEditDrawModalComponent, DataExportComponent,
        ShowResumeComponent, FileManageComponent, SearchComponent,
        FileManageDetailComponent, DriverComponent, ImportBopComponent,
        ProcedureChangeComponent, BomChangeComponent, AddOrEdditComponent,
        MaintainComponent, BomShowResumeComponent, BomAddOrEditComponent,
        BomMaintainComponent, BomApprovalComponent, MaterialSonComponent, MountDetailsComponent, PersonManagementComponent, TeamManagementComponent, WorkReporComponent, WorkReporRecordComponent, PrrcedureShowResumeComponent, ProdureApprovalComponent, WatchMaintainComponent, BopExportComponent, TskExportComponent, ChooseBomComponent

    ],
    exports: [
        AddMemberModalComponent,
        AddRoleModalComponent,
        CreateOrEditBopModalComponent
    ],
    providers: [
        ImpersonationService,
        TreeDragDropService,
        { provide: BsDatepickerConfig, useFactory: NgxBootstrapDatePickerConfigService.getDatepickerConfig },
        { provide: BsDaterangepickerConfig, useFactory: NgxBootstrapDatePickerConfigService.getDaterangepickerConfig },
        { provide: BsLocaleService, useFactory: NgxBootstrapDatePickerConfigService.getDatepickerLocale }
    ]
})
export class AdminModule { }
